<?php
/**
 * ShopEx licence
 *
 * @copyright  Copyright (c) 2005-2010 ShopEx Technologies Inc. (http://www.shopex.cn)
 * @license  http://ecos.shopex.cn/ ShopEx License
 */


/**
 * brand 模板
 */
class b2c_mdl_synerrorlog extends dbeav_model{
    function __construct($app){
        parent::__construct($app);
        $this->use_meta();
    }

    //查询积分
	function getiteminfo($integral) 
	{    
 
        $sql = "SELECT *    
        FROM  sdb_b2c_integral 
        where  iseffect= 1 and  $integral  between fromintegral and tointegral limit 0,1;";
        $rows = $this->db->select($sql);
 
        return  $rows[0]['money'];
     }


  //查询 积分起 是否存在
    function getfromintegral($fromintegral) 
    {    
         $sql = "SELECT *    
        FROM  sdb_b2c_integral 
        where iseffect= 1 and   $fromintegral  between fromintegral and tointegral limit 0,1;";
        $rows = $this->db->select($sql);
        return  $rows[0]['money'];
    }
    //查询积分到是否存在
    function gettointegral($tointegral) 
    {    
         $sql = "SELECT *    
        FROM  sdb_b2c_integral 
        where iseffect= 1 and  $tointegral  between fromintegral and tointegral limit 0,1;";
        $rows = $this->db->select($sql);
        return  $rows[0]['money'];
    }


}
